﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    ValidateRequest="false" CodeFile="SubCategory.aspx.cs" Inherits="V_FactoryManagement_Building" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="titlePlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="menuPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <div class="divcontent">
        <table width="100%">
            <tr>
                <td>
                    <div style="padding-bottom: 7px;">
                        <div class="divfirst1" style="width: 129px">
                            <%=Utilitys.Dictionary["Titlevn"]%>
                            <span style="color: Red;">(*)</span>:
                        </div>
                        <div class="divlast1">
                            <asp:TextBox ID="txtName" runat="server" Width="400"></asp:TextBox>
                            <asp:RequiredFieldValidator runat="server" ID="name" ControlToValidate="txtName"
                                Display="None" ErrorMessage="<b>Tiêu đề tiếng việt</b><br />Không thể rỗng."></asp:RequiredFieldValidator>
                            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"
                                TargetControlID="name" HighlightCssClass="validatorCalloutHighlight" />
                        </div>
                    </div>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <contenttemplate>
                        <div style="padding-bottom: 7px;">
                            <div class="divfirst1" style="width: 130px">
                                <%=Utilitys.Dictionary["Category"]%>
                                <span style="color: Red;">(*)</span>:
                            </div>
                            <div class="divlast1">
                                <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddCategory_OnSelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:CustomValidator ID="cusDepartment" runat="server" ClientValidationFunction="ddlCategory">*</asp:CustomValidator></div>
                        </div>
                        <div style="padding-bottom: 7px;">
                            <div class="divfirst1" style="width: 130px">
                                <%=Utilitys.Dictionary["SubCategory"]%>
                                :
                            </div>
                            <div class="divlast1">
                                <asp:DropDownList ID="ddlSubCat" runat="server">
                                </asp:DropDownList></div>
                        </div>
                    </contenttemplate>
                    </asp:UpdatePanel>
                    <div style="padding-bottom: 7px; display: none">
                        <div class="divfirst1" style="width: 129px">
                            <%=Utilitys.Dictionary["UserName"] %>
                            <span style="color: Red;">(*)</span>:
                        </div>
                        <div class="divlast1">
                            <asp:DropDownList ID="ddluserid" runat="server" Width="200px" Enabled="false">
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div style="padding-bottom: 7px;">
                        <div class="divfirst1" style="width: 129px">
                            <%=Utilitys.Dictionary["Code"]%>
                            <span style="color: Red;">(*)</span>:</div>
                        <div class="divlast1">
                            <asp:TextBox runat="server" ID="txtcode"></asp:TextBox>
                        </div>
                    </div>
                    <div style="padding-bottom: 7px;">
                        <div class="divfirst1" style="width: 129px">
                            <%=Utilitys.Dictionary["Order"]%>
                            :</div>
                        <div class="divlast1">
                            <asp:TextBox ID="txtOrder" runat="server" Width="80px" /><asp:RegularExpressionValidator
                                ControlToValidate="txtOrder" ValidationExpression="^[0-9,.]+$" ID="redOrder"
                                runat="server" ErrorMessage="*">*</asp:RegularExpressionValidator></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div>
                        <div class="divfirst1" style="width: 129px">
                            <%=Utilitys.Dictionary["UploadImages"]%>
                            :
                        </div>
                        <div style="float: left; padding-right: 7px;">
                            <asp:FileUpload runat="server" ID="UL_Picture" /></div>
                        <div style="float: left; padding-right: 7px;">
                        </div>
                    </div>
                    <div style="clear: left; padding-top: 12px; padding-bottom: 14px;">
                        <table cellpadding="2" cellspacing="0" width="100%">
                            <tr>
                                <td>
                                    <div style="vertical-align: middle; padding-left: 14px;">
                                        <div class="label" style="float: left;">
                                            &nbsp;</div>
                                        <div style="float: left;">
                                            <asp:Image runat="server" ID="img" CssClass="img" /><asp:Button ID="btnDeleteImg"
                                                OnClick="btnDeleteImg_OnClick" runat="server" Text="Xoá hình" /></div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
        <div style="padding: 7px;">
            <asp:Literal ID="lb_error" runat="server"></asp:Literal>
        </div>
        <div class="divbutton" style="margin-left: 137px">
            <asp:Button runat="server" ID="btnSave" OnClick="btnSave_OnClick" />&nbsp;&nbsp;<a
                href="javascript:history.go(-1)"><asp:Button ID="btnBack" runat="server" /></a>
        </div>
        <div class="divbutton" style="color: Red;" align="center">
            <asp:Literal runat="server" ID="ltrmessage" />
        </div>
    </div>

    <script type="text/javascript">
        var k = document.getElementById("<%=btnBack.ClientID%>");
        k.value = "<%=Utilitys.Dictionary["Back"]%>";
        var h = document.getElementById("<%=btnSave.ClientID%>");
        h.value = "<%=Utilitys.Dictionary["Save"]%>";

    </script>

</asp:Content>
